package com.javaapi.mvc;

public class LogIn {

	public boolean login(User user) {
		if ("".equals(user.getUserName()) || null == user.getUserName() || 0 == user.getUserName().length()) {
			System.out.println("username error");
			return false;
		} else if ("".equals(user.getPwd()) || null == user.getPwd() || 0 == user.getPwd().length()) {
			System.out.println("password error");
			return false;
		}

		if ("woailuo".equals(user.getUserName()) & "10113693".equals(user.getPwd())) {
			System.out.println("login rignt");
			return true;
		}
		return false;
	}
}
